package cn.kgc.crowdfundingadmin.service;

import cn.kgc.crowdfundingadmin.mapper.MenuMapper;
import cn.kgc.crowdfundingadmin.pojo.Menu;
import cn.kgc.crowdfundingadmin.pojo.MenuExample;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Scope
@Service("menuService")
public class MenuServiceImpl implements MenuService {
    @Resource
    MenuMapper menuMapper;

    @Override
    public void delete(int id) {
        menuMapper.deleteByPrimaryKey(id);
    }

    @Override
    public void update(Menu menu) {
        menuMapper.updateByPrimaryKeySelective(menu);
    }

    @Override
    public Menu getMenuById(Integer id) {
        return menuMapper.selectByPrimaryKey(id);
    }

    @Override
    public void saveMenu(Menu menu) {
        menuMapper.insert(menu);
    }

    @Override
    public List<Menu> getAll() {
        return menuMapper.selectByExample(null);
    }

    @Override
    public int countByExample(MenuExample example) {
        return 0;
    }

    @Override
    public int deleteByExample(MenuExample example) {
        return 0;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(Menu record) {
        return 0;
    }

    @Override
    public int insertSelective(Menu record) {
        return 0;
    }

    @Override
    public List<Menu> selectByExample(MenuExample example) {
        return null;
    }

    @Override
    public Menu selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByExampleSelective(Menu record, MenuExample example) {
        return 0;
    }

    @Override
    public int updateByExample(Menu record, MenuExample example) {
        return 0;
    }

    @Override
    public int updateByPrimaryKeySelective(Menu record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Menu record) {
        return 0;
    }
}